package com.smart.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smart.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<String> getRoleMenus(String id);

    void deleteMenuByRoleId(@Param("ids") List<String> ids);

    void insertRoleMenus(@Param("roleId") String roleId, @Param("menuIds") List<String> menuIds);

    List<String> selectRolesByUserId(Object userId);

    List<String> selectRolesCodeByUserId(Object loginId);

    void deleteRoleByUserId(@Param("userIds") List<String> userId);

    void addRoleUser(@Param("userId") String userId, @Param("roleIds") List<String> roleIds);

}
